import {defineConfig} from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import MiniProgramTailwind from '@dcasia/mini-program-tailwind-webpack-plugin/rollup';
// import WindiCSS from 'vite-plugin-windicss';
import tailwindcss from 'tailwindcss'
import autoprefixer = require("autoprefixer");

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        uni(),
        // WindiCSS(), // 添加 windicss
        MiniProgramTailwind(), //兼容小程序插件，如需要打包h5，则注释该插件，不要使用该插件打包，不然会出现问题的。
    ],
    css: {
        postcss: {
            plugins: [
                tailwindcss,
                autoprefixer,
            ]
        }
    }
});
